package top.soulblack.purchasesale.exception;


import lombok.Getter;
import top.soulblack.purchasesale.common.enums.ResultEnum;

/**
 * @Author: 韦溜溜
 * @Description:商品异常
 * @Date: Create in 19:42 2018/12/18
 */
@Getter
public class PurchaseException extends RuntimeException{

    private Integer code;

    public PurchaseException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }

    public PurchaseException(Integer code, String message){
        super(message);
        this.code=code;
    }
}
